Repository navigation
Conversation
AetherAI3
marked this pull request as ready for review
September 30, 2026 20:06
4 of 6 tasks
AetherAI3
added a commit
that referenced
this pull request
Oct 6, 2026
Publish a display/1 diff_summary to the active RC session when a real
checkout diff is established: in `rc start`'s opening batch, and after a
local coding run settles. Paths come from `git status`; counts come only
from git numstat and bounded direct reads, never from prose or model
output. Publication is best-effort: every failure is swallowed and never
changes the local result.
Final behaviour:
- All three counts (files_changed, insertions, deletions) are always
present, as Cloud's display/1 contract requires. A clean tree is 0/0/0.
- A binary file is a changed file with 0 lines; git has no line count
for binary ("-" in numstat).
- Untracked text files are counted as git would count them once added,
with bounded direct reads (8 MiB per file, 32 MiB and 1000 files per
snapshot) that never follow a link out of the checkout and that honour
.gitattributes (-diff/binary, diff, filter, working-tree-encoding)
through `git check-attr`, chunked to fit the Windows command line.
- Any unknown count means no summary rather than a misstated one: a
failed git read, a changed tracked path numstat did not measure, or an
untracked file that is too large, external, unreadable or
filter-converted, or bounds exceeded.
- Unsafe roots and paths are refused: a project root that is not the
checkout toplevel, and any absolute, traversal, drive-qualified or
leading-"~" path (Cloud reads a leading "~" as a home path).
- `files` is a prefix of the sorted paths, bounded to 64 entries and to
16 KiB of JSON as the broker measures it; files_changed counts every
path.
- The outbox sanitizer refuses a diff_summary without valid
non-negative integer counts or with an unsafe file path, and sizes
every payload the way the broker does (ensure_ascii JSON, not UTF-8),
so no payload Cloud would answer 400 reaches durable storage and
wedges the batch behind it.
Supersedes #240.
Closes #218.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
AetherAI3
added a commit
that referenced
this pull request
Oct 6, 2026
Publish a display/1 diff_summary to the active RC session when a real
checkout diff is established: in `rc start`'s opening batch, and after a
local coding run settles. Paths come from `git status`; counts come only
from git numstat and bounded direct reads, never from prose or model
output. Publication is best-effort: every failure is swallowed and never
changes the local result.
Final behaviour:
- All three counts (files_changed, insertions, deletions) are always
present, as Cloud's display/1 contract requires. A clean tree is 0/0/0.
- A binary file is a changed file with 0 lines; git has no line count
for binary ("-" in numstat).
- Untracked text files are counted as git would count them once added,
with bounded direct reads (8 MiB per file, 32 MiB and 1000 files per
snapshot) that never follow a link out of the checkout and that honour
.gitattributes (-diff/binary, diff, filter, working-tree-encoding)
through `git check-attr`, chunked to fit the Windows command line.
- Any unknown count means no summary rather than a misstated one: a
failed git read, a changed tracked path numstat did not measure, or an
untracked file that is too large, external, unreadable or
filter-converted, or bounds exceeded.
- Unsafe roots and paths are refused: a project root that is not the
checkout toplevel, and any absolute, traversal, drive-qualified or
leading-"~" path (Cloud reads a leading "~" as a home path).
- `files` is a prefix of the sorted paths, bounded to 64 entries and to
16 KiB of JSON as the broker measures it; files_changed counts every
path.
- The outbox sanitizer refuses a diff_summary without valid
non-negative integer counts or with an unsafe file path, and sizes
every payload the way the broker does (ensure_ascii JSON, not UTF-8),
so no payload Cloud would answer 400 reaches durable storage and
wedges the batch behind it.
Supersedes #240.
Closes #218.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner
Author
|
Superseded by #292 (merged): the #218 commit there keeps this PR's intent and fixes the contract defect — all three diff counts are always present (binary = changed file with 0 lines, untracked text counted with bounded reads, any unknown count → no summary), so Cloud never answers 400 and the outbox never wedges. Live-verified in the #229 journey (Linux diff 3 files +9/−1). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
diff_summaryat session start and after a code run settles, based on Git porcelain status and staged/unstaged numstat reads. Settled coding worktree snapshots use the launch project's existing RC outbox and live observer.Verification
npm run buildpassed.c0636cd:npm run buildand the full local suite passed with 2,902 passed, 43 skipped, 0 failed (2,945 total).cd85030includes the RC JSON handoff from main.npm run buildand 95 focused RC tests passed. The serialized full suite (AETHER_ATS_PYTHON=<installed Python 3.11> node --test --test-concurrency=1 --test-isolation=none "dist/test/**/*.test.js") recorded 2,902 passed, 43 skipped, 3 failed (2,948 total). Failures were in unchanged controlled Edge and managed preview tests on this loaded Windows host. The preview test passed in isolation; two Edge cases remained flaky in an isolated rerun. This head does not have a clean full-suite result.Issue: #218